package com.atguigu.guli.service.edu.service;

import com.atguigu.guli.service.base.dto.CourseDto;
import com.atguigu.guli.service.edu.entity.Course;
import com.atguigu.guli.service.edu.entity.form.CourseInfoForm;
import com.atguigu.guli.service.edu.entity.vo.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author wangyang
 * @since 2021-05-26
 */
public interface CourseService extends IService<Course> {

    /*这个类是一个表单类，数据库没有实体类与之对应，所以需要分开保存
     返回的是新增课程的id
    * */
   String saveCourseInfo(CourseInfoForm courseInfoForm);

   CourseInfoForm getCourseById(String id);

   void updateCourseInfoById(CourseInfoForm courseInfoForm);

   IPage<CourseVo> selectPage(long currentPage, long pageSize, CourseQueryVo courseQueryVo);

    void removeCoverById(String id);

    boolean removeCourseById(String id);

    CoursePublishVo getPublishCourseById(String id);

    boolean publishCourseById(String id);

    List<Course> findByCondition(WebCourseQueryVo webCourseQueryVo);

    WebCourseVo findTeacherAndCourse(String courseId);

    List<Course> selectHotCourse();

    CourseDto getCourseDtoById(String courseId);
}
